-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[16.0][MIG] fleet vehicle purchase : Migration to 16.0 #155
base: 16.0
Are you sure you want to change the base?
Conversation
Currently translated at 100.0% (9 of 9 strings) Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/es/
Currently translated at 100.0% (9 of 9 strings) Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/it/
Currently translated at 100.0% (9 of 9 strings) Translation: fleet-14.0/fleet-14.0-fleet_vehicle_purchase Translate-URL: https://translation.odoo-community.org/projects/fleet-14-0/fleet-14-0-fleet_vehicle_purchase/pt_BR/
@api.depends("fleet_vehicle_from_po") | ||
def _compute_fleet_vehicle_id(self): | ||
for rec in self: | ||
if rec.fleet_vehicle_from_po: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this boolean field. It sets to True
when the order is related to a fleet vehicle. So this if section will always be True
in this case.
So when the order is not related to a fleet vehicle, it'll fill the fleet_vehicle_id
is an empty recordset (and that's also the expected behavior).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to cover a practical case where we want to order pieces for several fleet vehicle in one PO:
- If we put the vehicle on the PO, it will be propagate on all purchase order lines and the vehicle will be readonly in the view. In this case the PO is for one vehicle.
- If we don't put the vehicle on the PO, we can order pieces for different vehicles in one PO, changing the vehicle on each line. This allows a big customer to order pieces for more than one vehicle in one PO.
ad097ce
to
ed9dae2
Compare
Initially, there was only one vehicle for one PO. Now, if the vehicle is set on the PO, all the PO lines are related to this vehicle But if the vehicle is not set on the PO, the user can decide to have different vehicles on every line. Use case is a grouped purchase of several items for several vehicles.
ed9dae2
to
bb02ffd
Compare
/ocabot migration fleet_vehicle_purchase |
No description provided.